home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4823 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  988 b 

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: IMPORTANT!!!!!!!!!!!!!!!!!!!!!
  5. Date: Thu, 01 Feb 1996 04:39:16 GMT
  6. Organization: Netcom
  7. Message-ID: <311043bd.32347008@nntp.ix.netcom.com>
  8. References: <4epb8s$9gp@reader2.ix.netcom.com>
  9. NNTP-Posting-Host: ix-dc11-20.ix.netcom.com
  10. X-NETCOM-Date: Wed Jan 31  8:39:45 PM PST 1996
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. jeremyx@ix.netcom.com(Jeremy Johnston ) wrote:
  14.  
  15. >         For some reason i can never get the \ to print! How do you get
  16. > the \ to show up on the screen when you run the program?? 
  17. > ex:
  18. > printf(" i can never get the \ to print");
  19. > printf(" do you like dogs\cats?");
  20. >     after i compile the program & run it the "\" doesn'y show up?
  21. > please help!?
  22.  
  23. In C++ literal strings, \ is an escape character.  You need something
  24. like
  25.  
  26.     printf(" i can never get the \\ to print");
  27.     printf(" do you like dogs\\cats?");
  28.  
  29.  
  30. Michael M Rubenstein
  31.